package com.kj.tms.system.service.basicinfo.dao;


import com.kj.tms.common.bean.dao.BaseMapper;
import com.kj.tms.pri.system.basicinfo.dto.TaxPayersInfoDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ProjectName:
 * @Package: com.kj.tms.system.service.basicinfo.dao
 * @ClassName: TaxPayersInfoMapper
 * @Description: 纳税主体dao类
 * @Author: 董世栋
 * @CreateDate:
 * @UpdateUser:
 * @UpdateDate:
 * @UpdateRemark:
 * @Version: 1.0
 * Copyright: 北京宏图天安 Copyright (c) 2017
 */
@Repository
public interface TaxPayersInfoMapper extends BaseMapper<TaxPayersInfoDto> {

    /**
     * @param record
     * @return int
     * @throws
     * @method insert
     * @description 添加数据
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    int insert(TaxPayersInfoDto record);

    /**
     * @param id
     * @return TaxPayersInfoDto
     * @throws
     * @method getByPrimaryKey
     * @description 主键查询纳税主体
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    TaxPayersInfoDto getByPrimaryKey(@Param("id") String id);

    /**
     * @param record
     * @return int
     * @throws
     * @method updateByPrimaryKeySelective
     * @description 更新数据
     * @author dongshidong
     * @version 1.0
     * @date 2017/11/08 9:38
     */
    int updateByPrimary(TaxPayersInfoDto record);

    /**
    * @Method
    * @Param       orgCode
    * @Return
    * @Exception
    * @Description [删除组织关系]
    * @Author      dsd
    * @Version     1.0
    * @Date        2018/2/1 14:46
    */
    int updateToDelOrgRelease(@Param(value = "orgCode") String orgCode);


    /**
     * @param curOrgCode
     * @method [queryListByOrgCode]
     * @description [通过当前机构查询纳税主体]
     * @author [王国庆]
     * @version 1.0
     * @date
     */
    List<TaxPayersInfoDto> queryListByOrgCode(@Param("curOrgCode") String curOrgCode);

    /**
     * @Method getByCode
     * @Param code
     * @Return List
     * @Exception
     * @Description [通过税号查询纳税主体税号是否重复]
     * @Author dsd
     * @Version 1.0
     * @Date 2017/11/23 11:37
     */
    List<String> getByCode(@Param("code") String code);

    /**
     * @Method getByOrgCode
     * @Param dto,isInsert
     * @Return List
     * @Exception
     * @Description [通过组织编码查询是否已经绑定过组织]
     * @Author dsd
     * @Version 1.0
     * @Date 2017/11/23 11:37
     */
    List<TaxPayersInfoDto> getByOrgCode(@Param("orgCode") String orgCode);


}

